import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
import Layout from '@/views/layout/index.vue';
import { routes } from './routes';

const router = createRouter({
  history: createWebHistory('manage'), // hash模式：createWebHashHistory，history模式：createWebHistory
  routes: [
    {
      path: '/',
      redirect: '/biz',
      component: Layout,
      children: routes,
    },
  ],
});

export { routes };

export default router;

window.router = router;
